<!DOCTYPE html>
<html class="ui-page-login">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>修改昵称</title>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="css/style.css" rel="stylesheet" />
		<link href="css/reg_style.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
	</head>
	<style type="text/css">
		header em{
			color: #4198FF;
		}
	</style>
	<body>
		<header class="mui-bar mui-bar-nav head1">
			<em class="mui-action-back"><img class="img1" src="img/fanhui.png" alt="" /></em>
		</header>
		<div class="mui-content">
			<div class="mui-content-padded content-box">
				<h3 class="title-ver">请输入您的昵称</h3>
				<form id='login-form' class="mui-input-group">
					<div class="mui-input-row char2">
						<label>昵称</label>
						<input oninput="judge_nickname();" id='mine-name' maxlength="8" type="text" class="mui-input-clear mui-input" placeholder="请输入您的昵称">
					</div>
					
				</form>
				<div class="link-area forgetPassword red">
					<a id='forgetPassword'>昵称须为四字以内，即八个字符</a>
				</div>

				
			</div>
			<button onclick="mine_modify();" disabled="disabled" id='btn_login' class="mui-btn mui-btn-block mui-btn-primary jianbiananniu">提交</button>
			<div class="mui-content-padded oauth-area">
	
			</div>
		</div>
		<!--/********************日期控件**************************/-->
		<!--<link rel="stylesheet" type="text/css" href="css/hgs-date.css" />
		<script src="js/hgs-date.js"></script>-->
		<!--/********************日期控件**************************/-->
		<input id="index-shop-lists-id" type="hidden">
		<input id="index-shop-lists" type="hidden">
		<input id='index-end-date' type="hidden" />
		<input id='index-start-date' type="hidden" />

		<!--/***************************************************/-->
		<script src="js/mui.min.js"></script>
		<script src="js/mui.enterfocus.js"></script>
		<script src="js/app.js"></script>
		<script src="js/jquery.js"></script>
		<!--<script type="text/javascript" src="js/jsencrypt.min.js"></script>
		<script src="js/md5.js"></script>-->
		<script src="js/crypto-js.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/fuction.js"></script>
		<script>
			//判断昵称长度，是否正确
			function judge_nickname() {
				var nickname = mui('#mine-name')[0].value;
				if(GetLength(nickname) >= 2) {
					document.getElementById("btn_login").disabled = false;
					btn_login_se('jianbian3_shengse',"#btn_login");
					mui("#forgetPassword")[0].innerHTML = '&nbsp;';
				} else {
					document.getElementById("btn_login").disabled = true;
					btn_login_se('jianbian1_qianse',"#btn_login");
					mui("#forgetPassword")[0].innerHTML = '昵称必须为4个字以内，即8个字符';
				}

			}

			mui.ready(function() {
				//获取当前的客户数据
				xminereadyload();
				
				mui("#mine-name")[0].value = user_info.real_name;
			});

			//个人资料修改
			function mine_modify() {
				var xbx = {}; //登录后的参数对象AES加密
				xbx.field_value = mui("#mine-name")[0].value; //要修改的字段值
				xbx.field_name = 'real_name'; //要修改的字段名  avatar, nickname

				official_login_after(url_host + 'mine/modify', xbx, 'mine_modify_mine_name');

			};
		</script>
	</body>

</html>